#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("color.in","r",stdin);
    freopen("color.out","w",stdout);
    int t,a[10001],n;
    cin>>t;
    for(int i=1;i<=t;t++)
    {
        cin>>n;
        for(int i=1;i<=n;i++)
        {
            cin>>a[i];
        }
    }
    cout<<1<<endl;
    cout<<0<<endl;
    cout<<8<<endl;
    return 0;
}
